﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Education01.Common">
    
    <DataTemplate x:Key="BulletinTemplate">
        <Grid Width="{Binding TileWidth}" Height="{Binding TileHeight}" Background="Black">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="20"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="20"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="20"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height=".05*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>            
            <Image Source="{Binding Image}" Grid.ColumnSpan="3" Height="240" Grid.RowSpan="5" Stretch="UniformToFill"/>
            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Title}" Foreground="{Binding TileClr}" Grid.Column="1" FontSize="16" FontFamily="Segoe UI" VerticalAlignment="Top" Grid.RowSpan="2" Margin="0,10,0,5"/>
            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Subtitle}" Foreground="White" Grid.Column="1" FontSize="12.5" FontFamily="Segoe UI" VerticalAlignment="Top" Grid.Row="1" Grid.RowSpan="2" Margin="0,0,0,5"/>
        </Grid>
    </DataTemplate>
    
    <DataTemplate x:Key="NormalTemplate">
        <Grid Width="240" Height="240">
        	<Image Source="{Binding Image}" Stretch="Fill"/>

            <Grid HorizontalAlignment="Right" Height="50" VerticalAlignment="Bottom" Width="140" Margin="0,10" Background="{Binding TileClr}">
        		<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10,0">
        			<TextBlock TextWrapping="Wrap" Text="{Binding Title}" HorizontalAlignment="Right" FontSize="12" Foreground="White"/>
                    <TextBlock TextWrapping="Wrap" Text="{Binding Subtitle}" FontSize="12" Foreground="White"/>
        		</StackPanel>
        	</Grid>
            
        </Grid>
    </DataTemplate>
    
    <DataTemplate x:Key="TourTemplate">
        <Grid Width="390" Height="490">
            <Image Source="{Binding Image}" Stretch="UniformToFill"/>
        </Grid>
    </DataTemplate>
    
    <DataTemplate x:Key="OverviewTemplate">
        <Grid Width="430" Height="490">
            <TextBlock FontSize="14" Foreground="Black" TextWrapping="Wrap" Margin="0,0,20,20" FontWeight="Light">
                <Run Text="{Binding Title}"/><LineBreak/><LineBreak/>
                <Run Text="{Binding Subtitle}"/><LineBreak/><LineBreak/>
                <Run Text="{Binding Description}"/><LineBreak/><LineBreak/>
            </TextBlock>
        </Grid>
    </DataTemplate>
    
    <DataTemplate x:Key="AdmissionTemplate">
        <Grid Width="540" Height="{Binding TileHeight}" Background="Black">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid Background="{Binding TileClr}">
                <TextBlock Text="{Binding Title}" Foreground="White" FontSize="20" TextWrapping="Wrap" Margin="12"/>
            </Grid>
            <TextBlock Grid.Column="1" Foreground="White" Text="{Binding Subtitle}" FontSize="12" TextWrapping="Wrap" Margin="14" HorizontalAlignment="Left"/>
        </Grid>
    </DataTemplate>
    
    <DataTemplate x:Key="CurriculamTemplate">
        <Grid Width="150" Height="{Binding TileHeight}" Background="Black">
            <TextBlock Text="{Binding Title}" FontSize="16" Foreground="{Binding TileClr}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="12" TextWrapping="Wrap"/>
            <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="12">
                <TextBlock Text="{Binding Subtitle}" FontSize="15" Foreground="White" HorizontalAlignment="Right"  TextWrapping="Wrap"/>
                <TextBlock Text="{Binding Description}" FontSize="14" Foreground="White" TextWrapping="Wrap"/>
            </StackPanel>
        </Grid>
    </DataTemplate>    
  
</ResourceDictionary>
